/**
 * 
 *this GUI class is a GUI window use to display charts and graphs
 ***All communications with the Database for access it's data going thru the Controller Class Sys.Java**
 */
package GUI;

import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.jfree.chart.ChartPanel;

import GUI.Report.ReportManage;

public class BarChartWindow extends JFrame
{

	private static final long serialVersionUID = 1L;

	public BarChartWindow(ChartPanel pie)
	{
		getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JPanel panel = new JPanel();
		getContentPane().add(panel);
		panel.add(pie);
		panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JButton button = new JButton("\u05E1\u05D2\u05D5\u05E8");
		button.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent arg0)
			{
				ReportManage RepWindow=new ReportManage();
				RepWindow.setVisible(true);
				dispose();
			}
		});
		button.setFont(new Font("David", Font.PLAIN, 14));
		getContentPane().add(button);
		this.pack();
	}
}